package com.tianyu.inspection.entity;

import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**********************************
 * @Author YSW
 * @Description
 * @Date 2021/1/4 - 11:00
 **********************************/

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName(autoResultMap = true)
public class User implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String userName;
    private String password;
    private String token;
    private String phone;
    private String nickName;
    private String address;
    private String avatarUrl;
    private String lastIp;
    private Date lastTime;
    private Integer state;
    private Integer roleId;
    private Integer projectId;

    /**
     * 客户端模块显示字段
     */
    @TableField(exist = false)
    private String clientModule;

    /**
     * 客户端名称
     */
    @TableField(exist = false)
    private String clientName;

    /**
     * 客户端Logo
     */
    @TableField(exist = false)
    private String clientLogo;

    /**
     * 客户端Logo
     */
    @TableField(exist = false)
    private String tiltPhotographUrl;

    /**
     * 基础设施选择字段
     */
    @TableField(exist = false)
    private String infrastructureTypeUse;

    /**
     * 施工作业区选择字段
     */
    @TableField(exist = false)
    private String constructionTypeUse;

    /**
     * 桩牌选择字段
     */
    @TableField(exist = false)
    private String pileCardTypeUse;

    /**
     * 高后果区选择字段
     */
    @TableField(exist = false)
    private String highConsequenceAreaTypeUse;

    /**
     * 通用设施选择字段
     */
    @TableField(exist = false)
    private String generalFacilitiesTypeUse;

    /**
     * 摄像头类型选择字段
     */
    @TableField(exist = false)
    private String cameraTypeUse;

    /**
     * 系统类型选择字段
     */
    @TableField(exist = false,typeHandler = JacksonTypeHandler.class)
    private JSONArray sysTypeUse;
    /**
     * 角色
     */
    @TableField(exist = false)
    private Role role;
    /**
     * 账户[参数字段]
     */
    @TableField(exist = false)
    private String account;
    /**
     * 资源主机
     */
    @TableField(exist = false)
    private String resourceHost;
    /**
     * 是否在线
     */
    @TableField(exist = false)
    private Boolean isOnline;
}
